/**
 * FileFind - ftp/shares indexing and search php engine
 * Module: agent-java
 * Description: Agent written in java language
 * Copyright (c) 2003-2010 Rage Steel, www.gt2.ru
 * ----------------------------------------------
 * $Id$
 */
package ru.ffind.agent.sync;

import java.util.Collection;
import java.util.Map;

import ru.ffind.common.model.Directory;
import ru.ffind.common.model.Filename;

/**
 *
 * Actions to synchronize target
 *
 * @author Rage Steel
 *
 */
public interface SyncActions {
	
	/**
	 * 
	 * Copy directory from the source
	 * 
	 * @param absolutePath absolute path to the directory
	 * @param targetParent parent directory in the target
	 * @param sourceDir
	 */
	void createDir(String absolutePath, Directory targetParent, Directory sourceDir);
	
	/**
	 * 
	 * Update directory metadata information
	 * 
	 * @param targetDir
	 * @param sourceDir
	 * 
	 */
	void editDir(Directory targetDir, Directory sourceDir);
	
	/**
	 * 
	 * Remove directory with all contents
	 * 
	 * @param absolutePath
	 * @param targetDir
	 * 
	 */
	void removeDir(String absolutePath, Directory targetDir);
	
	void createFiles(Collection<Filename> files, Directory target);
	
	/**
	 * 
	 * Update file metadata
	 * 
	 * @param files Map, where key is source and value is target file;
	 */
	void editFiles(Map<Filename, Filename> files);
	
	void removeFiles(Collection<Filename> files);
	
}
